package com.teemor.common.bean.utils.tmpl;

import com.teemor.common.bean.utils.enums.ResultCode;
import org.omg.CORBA.PUBLIC_MEMBER;

public class ResponseBen<T> {
    private Integer code;

    private String msg;

    private Object data;

    private Long total;

    private Long ttl;

    public ResponseBen() {
        this.code = ResultCode.SUCCESS.value();
    }

    public ResponseBen(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public void setCode(ResultCode resultCode) {
        this.code = resultCode.value();
        this.msg = resultCode.msg();
    }
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Long getTtl() {
        return ttl;
    }

    public void setTtl(Long ttl) {
        this.ttl = ttl;
    }
}
